
<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
    <meta name="misapplication-tap-highlight" content="no"/>
    <meta name="HandheldFriendly" content="true"/>
    <meta name="MobileOptimized" content="320"/>
    <title>登陆</title>
    <#assign base=request.contextPath  />
    <link rel="stylesheet" type="text/css" href="${base}/Yang/layui/css/layui.css"/>
    <link rel="stylesheet" href="${base}/css/common.css" type="text/css" charset="utf-8" />
    <script src="${base}/Yang/layui/layui.js"></script>
    <script src="${base}/Yang/jquery-1.9.0.min.js"></script>
    <script src="${base}/Yang/layui/layui.all.js" charset="utf-8"></script>
    <style type="text/css">
        #header a {
            color: white;
        }
        .layui-btn-fluid {
            width: 90%;
        }
        .layui-breadcrumb a:hover {
            color: #1E9FFF !important;
        }
        .layui-breadcrumb a:visited {
            color: #1E9FFF;
        }
        input{
            -webkit-user-select:text !important;
            padding-left: 10px;
            width: 87%;
            height: 38px;
            margin: 3px 0px;
            border-radius: 5px;
            line-height: 1.3;
            border: 1px solid #9AC747;

        }

        select {
            /* display: block; */
            padding-left: 10px;
            width: 90%;
            height: 41px;
            margin: 3px 0px;
            border-radius: 5px;
            border: 1px solid #9AC747;
            color: white;
            background-color: #9AC747;
        }

    </style>
</head>
<body onselectstart="return false;">
<div class="content">
    <img style="width: 150px;height: 150px;" src="${base}/img/11-2.png"/>
    <h1 style="margin-bottom: 20px;">集充充</h1>
    <select id="flag">
        <option value="2">个人</option>
        <option value="1" selected="">企业</option>
    </select><br/>
    <input  placeholder="用户名/手机号" id="userName" class="" type="text"><br/>
    <input  placeholder="登录密码" class="" id="passWord" type="password"><br/><br/>
    <#--<img src="${base}/weUser/getPhoto?path=D:/充电桩项目/Charge/uploads/1540884632862ww.png">-->
    <div style="width: 100%;">
        <button onclick="login()" class="layui-btn layui-btn-fluid"  style="background-color: #9AC747;border-radius: 5px;">登录</button>
    </div><br />
    <div style="width: 94%;font-size: 14px;">
        <span style="float: left;margin-left: 20px;color: #9AC747"><a href="${base}/weUser/regist.html">手机快速注册</a></span>
        <span style="float: right;color: #9AC747;"><a href="${base}/weUser/forget_password.html">忘记密码</a></span>
    </div>
    <#--  <div class="foot">
          <fieldset class="layui-elem-field layui-field-title site-demo-button">
              <legend style="font-size: 16px;">登录人微信</legend>
          </fieldset>
          <p style="margin-bottom: 30px;"><i class="layui-icon layui-icon-login-wechat" style="font-size: 30px; color: #1E9FFF;"></i>  </p>
      </div>-->
</div>

<script>
    function login(){
        $.ajax({
            type : "POST", //提交方式
            url : "${base}/weUser/login",//路径
            data :{userName:$("#userName").val(),passWord:$("#passWord").val(),flag:$("#flag").val()},
            success : function(data) {//返回数据根据结果进行相应的处理
                if (data.toString().indexOf("qixin")==-1) {
                    if(data!="true"){
                        layer.msg(data);
                    }else{
                        layer.msg("登陆成功");
                        window.location.href="${base}/weUser/main.html"
                    }
                }else {
                    window.location.href=""+data;
                }


            }
        });
    }
</script>
</body>
</html>
